<template>
  <ul class='list'>
    <li v-for="item in getListData">
      <div class="head pr">
        <p>订单编号：{{item.num}}</p>
        <p>订单日期：{{item.date}}</p>
        <span :class="'pa state '+ 'state'+item.state">{{item.state | formatState}}</span>
      </div>
      <div class="body">
        <img :src="item.img" class="fl" alt="">
        <div>
          <p class="title">{{item.title}}</p>
          <p class="starttime">开始时间：{{item.starttime}}</p>
          <p class="endtime">结束时间：{{item.endtime}}</p>
        </div>
      </div>
      <GreyLine></GreyLine>
    </li>
  </ul>
</template>
<script>
import GreyLine from '../../../../common/line.vue'
export default {
  props:["data"],
  components: {GreyLine},
  name: "",
  data() {
    return {
      list:[]
    };
  },
  computed:{
    getListData(){
      return this.list=this.data
    }
  },
  filters:{
    formatState(val){
      var array=["待确认","已确认","已发送"]
      return array[val-1]
    }
  },
  methods: {},
  created() {}
};
</script>
<style lang="scss" scoped>
.list {
  margin: 5px 15px;
  font-size: 12px;
  color: #999;

  .head{
    padding: 10px 0;
    border-bottom: 1px solid #f2f2f2;

    .state{
      top: 10px;
      right: 0;
      width: 60px;
      height: 26px;
      border-radius: 13px;
      font-size: 16px;
      line-height: 26px;
      text-align: center;
    }
    .state1{
      color: #FF5A5A;
      background-color: rgba(255, 90, 90,0.1)
    }
    .state2{
      color: #F39519;
      background-color: rgba(243,149,25,0.1)
    }
    .state3{
      color: #4ACC60;
      background-color: rgba(74,204,96,0.1)
    }
  }
  .body{
    min-height: 80px;
    box-sizing: border-box;
    padding: 10px 0;

    >img{
      width: 80px;
      height: 60px;
      vertical-align: middle;
    }
    >div{
      margin-left: 90px;
      vertical-align: middle;
      height: 100%;

      .title{
        font-size: 16px;
        color: #333;
      }
    }
  }
}
</style>